// Comparing beliefs in falsehoods based on satiric and non-satiric news
// Place all files in the same folder
// Uses all 12 waves of data, but falsehoods only
// Uses packages: center, coefplot, wtmean

use "ComparingBeliefs-PLOS ONE", clear

*Turn off graphics to accelerate execution
set graphics off

*Output scheme
set scheme uncluttered

////////
//////// Media use, psych characteristics, demographics ////////
////////

// Missing values
recode Feel1-TIP4 polid_W1 ecoid_W1 socid_W1 (8/9 = .)
recode newsint (7 = .)
recode race (97/99 = .)
recode gender educ pid3 (8/9=.)

// Value labels for YouGov-provided items
lab list race educ pid3 

// Demographics
recode gender (1=1) (2=0), gen(maled)
lab var maled "Male"

recode pid3 (2=1) (1=0) (else= .), gen(repd)
lab var repd "Republican"
lab var repd "Party Affiliation"
lab def repd 1 "Republican" 0 "Democrat" 
lab val repd repd
tab repd

recode pid3 (1=1) (2=0) (else= .), gen(demd)
lab var demd "Party Affiliation binary"
lab def demd 1 "Democrat" 0 "Republican"
lab val demd demd
tab demd

egen polid = rowmean(polid_W1 ecoid_W1 socid_W1)
sum polid

gen age = 2019-birthyr
recode age (18/29=1) (30/44=2) (45/59=3) (60/120=4), gen(agecat4)
lab var agecat4 "Age - 4 Categories"
lab def agecat4 1 "18-29" 2 "30-44" 3 "45-59" 4 "60+", replace
lab val agecat4 agecat4
tab agecat4

recode race (1=1) (2=2) (3=4) (4/5=3) (7=3) (6=5), gen(race5)
lab def race5 1 "White, non-Hispanic" 2 "Black, non-Hispanic" ///
	3 "Other, non-Hispanic" 4 "Hispanic" 5 "2+ Races, non-Hispanic", replace
lab val race5 race5
tab race5

recode educ (1=1) (2=2) (3/4=3) (5/6=4), gen(educ4)
lab def educ4 1 "Less than high school" 2 "High school" 3 "Some college" ///
	4 "Bachelor's degree or higher", replace
lab val educ4 educ4
tab educ4

recode newsint (4=1) (3=2) (2=3) (1=4), gen(polint)
lab var polint "Political interest"
tab polint

// Epistemic beliefs
alpha (Feel1_W1-Feel4_W1)
egen feel=rowmean(Feel1_W1-Feel4_W1)
lab var feel "Faith in Intuition for Facts"

alpha (Evid1_W1-Evid4_W1)
egen evid=rowmean(Evid1_W1-Evid4_W1)
lab var evid "Need for Evidence"

alpha (TIP1_W1-TIP4_W1)
egen TIP=rowmean(TIP1_W1-TIP4_W1)
lab var TIP "Truth is Political"

sum feel evid TIP

// CMQ: asked in last wave only
alpha (CMQ_a_W1-CMQ_e_W12)
egen CMQ=rowmean(CMQ_a_W1-CMQ_e_W12)
lab var CMQ "Conspiracy mentality"
sum CMQ

/////////
///////// Generate # of wave completions. /////////
///////// [In "Materials and Methods" section of manuscript]

forvalues i = 1/12 {
	display "wave `i'"
	count if weight_wave_`i' != .
}
	
egen completeWs=rownonmiss(weight_wave_1 weight_wave_2 weight_wave_3 weight_wave_4 weight_wave_5 ///
	weight_wave_6 weight_wave_7 weight_wave_8 weight_wave_9 weight_wave_10 weight_wave_11 weight_wave_12), strok
tab completeWs
	
////////
//////// Convert to long format ////////
////////

gen id = _n
reshape long weight_wave_ ///
	F1b_W F2b_W F3b_W F4b_W F5b_W F6b_W F7b_W F8b_W F9b_W F10b_W ///
	F1bn_W F2bn_W F3bn_W F4bn_W F5bn_W F6bn_W F7bn_W F8bn_W F9bn_W F10bn_W ///
	fbuse_W rduse_W twuse_W ///
	nuse_a_W nuse_b_W nuse_c_W nuse_d_W nuse_e_W nuse_f_W, i(id) j(wave)

// Omit missing waves
drop if weight_wave_ == .
	
lab def w 1 "W1" 2 "W2" 3 "W3" 4 "W4" 5 "W5" 6 "W6" 7 "W7" 8 "W8" 9 "W9" ///
	10 "W10" 11 "W11" 12 "W12"
lab val wave w

// Media use
recode nuse_a_W-nuse_f_W (8/9 = .)
egen news = rowmean(nuse_a_W-nuse_f_W)
lab var news "Average news use"

gen olnews = nuse_f_W
alpha nuse_a_W-nuse_e_W
lab var olnews "Average online news use"

egen offnews = rowmean(nuse_a_W-nuse_e_W)
lab var offnews "Average offline news use"
bysort wave: sum news olnews offnews
lab var nuse_a_W "Television news programs (morning or evening)"
lab var nuse_b_W "Print newspapers"
lab var nuse_c_W "Print news magazines"
lab var nuse_d_W "Radio news or radio talk shows"
lab var nuse_e_W "Television talk shows, public affairs or news analysis"
lab var nuse_f_W "Online news sites, blogs, or news apps"

alpha fbuse_W rduse_W twuse_W
egen smuse = rowmean(fbuse_W rduse_W twuse_W)
lab var smuse "Average social media use"

////////
//////// Convert to statement-long format ////////
////////

// Combine belief in familiar and unfamiliar statements
// Missing values & reverse coding (belief high)
recode F1b_W-F10bn_W (1=4) (2=3) (3=2) (4=1) (8/9 = .)
lab def belief 1 "Definitely False" 2 "Probably False" 3 "Probably True" 4 "Definitely True"
lab val F1b_W-F10bn_W belief

// False
forvalues i = 1/10 {
	egen fBelieve`i' = rowmean(F`i'b_W F`i'bn_W)
	lab var fBelieve`i' "Belief in claim F`i'"
}

lab copy F1b_W1 bel
lab val fBelieve1-fBelieve10 belief

gsort caseid wave

// Rename variables for simplicity
forvalues i = 1/10 {
	ren F`i'b_W Fb`i'
	ren F`i'bn_W Fbn`i'
}

// Reshape.
gen cwid = _n
order cwid
order Fb1-Fbn10 fBelieve1-fBelieve10, last
reshape long Fb Fbn fBelieve fBelieveN, i(cwid) j(snum)

recode fBelieve (1/3=0) (4=1), gen(fBelieveD)
lab var fBelieveD "Statement labeled definitely true"
lab val snum

////////
//////// Add add'l datasets ////////
////////

// Construct statement_num (format F1e_W1)
gen tflab="F" 
gen delimit="e_W"
egen statement_num=concat(tflab snum delimit wave)
drop tflab delimit
order statement_num, last

// Merge relevant data
joinby statement_num using "ComparingBeliefs-Slant.dta", unmatched(master)
drop _merge
joinby statement_num using "ComparingBeliefs-Engage.dta", unmatched(master)
drop _merge
ren sum_fbtot_eng_cnt FBeng
gen logFBeng=log(FBeng)
lab var logFBeng "Facebook engagement (log)"
joinby statement_num using "ComparingBeliefs-Statements.dta", unmatched(master)
drop _merge

////////
//////// Remaining recoding ////////
////////

// In-group/Out-group critical
gen conAtt=0 if demd==1|repd==1
replace conAtt=1 if demd==1&pFavor==2
replace conAtt=1 if repd==1&pFavor==1
lab var conAtt "Counter-attitudinal statement"
lab def conAtt 0 "Not counter-attitudinal" 1 "Counter-attitudinal"
lab val conAtt conAtt
gen proAtt=0 if demd==1|repd==1
replace proAtt=1 if demd==1&pFavor==1
replace proAtt=1 if repd==1&pFavor==2
lab var proAtt "Pro-attitudinal statement"
lab def proAtt 0 "Not pro-attitudinal" 1 "Pro-attitudinal"
lab val proAtt proAtt

// Create dummy corresponding to satire
gen satire=0
replace satire=1 if ///
	wave==1 & snum==2 | ///
	wave==1 & snum==3 | ///
	wave==1 & snum==4 | ///
	wave==2 & snum==7 | ///
	wave==3 & snum==2 | ///
	wave==3 & snum==8 | ///
	wave==4 & snum==5 | ///
	wave==4 & snum==10 | ///
	wave==5 & snum==1 | ///
	wave==5 & snum==2 | ///
	wave==5 & snum==3 | ///
	wave==5 & snum==6 | ///
	wave==6 & snum==1 | ///
	wave==6 & snum==2 | ///
	wave==6 & snum==3 | ///
	wave==6 & snum==4 | ///
	wave==6 & snum==5 | ///
	wave==7 & snum==6 | ///
	wave==7 & snum==7 | ///
	wave==8 & snum==1 | ///
	wave==8 & snum==2 | ///
	wave==8 & snum==3 | ///
	wave==8 & snum==6 | ///
	wave==8 & snum==7 | ///
	wave==8 & snum==8 | ///
	wave==9 & snum==2 | ///
	wave==9 & snum==3 | ///
	wave==9 & snum==5 | ///
	wave==9 & snum==6 | ///
	wave==9 & snum==7 | ///
	wave==9 & snum==9 | ///
	wave==10 & snum==1 | ///
	wave==10 & snum==2 | ///
	wave==10 & snum==3 | ///
	wave==10 & snum==5 | ///
	wave==10 & snum==6 | ///
	wave==10 & snum==7 | ///
	wave==10 & snum==9 | ///
	wave==11 & snum==2 | ///
	wave==11 & snum==4 | ///
	wave==11 & snum==5 | ///
	wave==11 & snum==7 | ///
	wave==12 & snum==1 | ///
	wave==12 & snum==3 | ///
	wave==12 & snum==5 | ///
	wave==12 & snum==7 | ///
	wave==12 & snum==9 | ///
	wave==12 & snum==10
lab var satire "Satire?"
lab def satire 0 "Not satire" 1 "Satire"
lab val satire satire
tab satire

sort wave snum

// Generate missing variable to identify demographcis for final sample.
gen nomiss = 1.
label variable nomiss "indicates Ps have no missing data for regression analyses"
replace nomiss = 0 if ///
    missing(fBelieve) | missing(satire) | missing(proAtt) | missing(conAtt) ///
    | missing(age) | missing(educ) | missing(maled) | missing(demd) ///
    | missing(polint) | missing(feel) | missing(evid) | missing(TIP) ///
    | missing(CMQ) | missing(smuse) | missing(olnews) | missing(offnews) ///
    | missing(logFBeng) | missing(id) | missing(wave)
tab nomiss

////////
//////// Materials and methods ////////
////////

set graphics on

// Party ID before missing data.
preserve
duplicates drop id, force
sum demd
restore

// Keep regression model sample (i.e., no missing data in observation)
keep if nomiss==1

//  Demographics
preserve
duplicates drop caseid, force
tab race5 
tab agecat4
tab educ4
tab demd
tab gender
restore

// Table 1
preserve
sort wave snum
gen sid = sum(statement_num != statement_num[_n-1]) 
duplicates drop sid, force
tab satire
bysort satire: tab(pFavor)
bysort wave: egen satire_cnt = total(satire)
gen nonsatire_cnt = 10-satire_cnt
duplicates drop wave, force
sum satire_cnt nonsatire_cnt
restore
bysort satire: sum fBelieveD fBelieve

// Table S1
preserve
duplicates drop statement_num, force
tab Statement pFavor
restore

// Table S2
preserve
egen tag = tag(high_pred_int_dname)
keep if tag==1
bysort satire: list high_pred_int_dname, sep(0)
bysort satire: egen site_cnt = total(tag)
duplicates drop satire, force
bysort satire: sum site_cnt
restore

//// Measures

// Participant-message attributes
tab proAtt
tab conAtt

// Media use
preserve
duplicates drop cwid, force
xtset id wave, generic
xtsum offnews olnews smuse
restore

// Engagement
preserve
duplicates drop statement_num, force
sum FBeng, detail
sum logFBeng, detail
restore

// Psychological factors
preserve
duplicates drop cwid, force
xtset id wave, generic
xtsum feel evid TIP CMQ
xtset, clear
restore

////////
//////// Results ////////
////////

// Belief by origin.
preserve
bysort satire: sum fBelieveD fBelieve
restore

preserve
egen meanBel= wtmean(fBelieveD), by(statement_num)
lab var meanBel "Proportion labeling falsehood 'Definitely True'"
duplicates drop statement_num, force
bysort satire: sum(meanBel)
restore

// Fig 1.
preserve
egen meanBel= wtmean(fBelieveD), by(statement_num)
lab var meanBel "Proportion labeling falsehood 'Definitely True'"
duplicates drop statement_num, force
bysort satire: sum(meanBel)
twoway (histogram meanBel if satire==1, ///
	percent start(0) width(.025) color(red%30)) ///
	(histogram meanBel if satire==0, ///
	percent start(0) width(.025) color(orange%30)), ///
	legend(on order(1 "Satiric origin" 2 "Non-satiric origin")) ///
	xline(.05, lw(medthin) lc(gs14)) ///
	ylabel(, nogrid) ///
	graphregion(color(white)) ///
	bgcolor(white) ///
	ysize(3) xsize(4) ///
	name(Fig1, replace) 
restore

graph export Fig1.eps, replace preview(on)

// Table 2.
preserve
keep if demd==0
bysort wave snum: tab fBelieve if satire==1	
restore

preserve
keep if demd==1
bysort wave snum: tab fBelieve if satire==1	
restore

////
//// Mixed effects regression models.
////
	
//  H1: Main effects and Table 3
collect clear
collect create main
collect: mixed fBelieve ///
	satire educ polint maled ///
	age demd proAtt conAtt feel evid TIP CMQ ///
	olnews offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(main)
collect export "fBelieveMainCoeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(main)
collect export "fBelieveMainModel.docx", replace


// RQ1: age. Table S3.
collect clear
collect create RQ1_S3
collect: mixed fBelieve ///
	satire educ polint maled ///
    age 1.satire#c.age ///
	demd ///
	proAtt conAtt feel evid TIP CMQ ///
	olnews offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ1_S3)
collect export "fBelieveRQ1_S3Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ1_S3)
collect export "fBelieveRQ1_S3Model.docx", replace

// RQ2a: ingroup beneficial. Table S4
collect clear
collect create RQ2a_S4
collect: mixed fBelieve ///
	satire educ polint maled ///
	age demd ///
    1.proAtt 1.satire#1.proAtt ///
	conAtt feel evid TIP CMQ ///
	olnews offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ2a_S4)
collect export "fBelieveRQ2a_S4Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ2a_S4)
collect export "fBelieveRQ2a_S4Model.docx", replace

// Fig 2.
margins satire#proAtt, level(95) 
marginsplot, xdimension(satire) by(proAtt, ///
	elabels(1 "Not ingroup beneficial" 2 "Ingroup beneficial")) ///
	ciopts(lcolor(teal) lwidth(*2)) ///
	plotopts(msize(large) mcolor(teal)) ///
	xtitle(" ") ytitle("Pred. belief in falsehood") ///
	title(" ") ///
	xlabel(-.5 " " 0 "Non-satiric origin" 1 "Satiric origin" 1.5 " ", tlength(0)) ///
	yli(2.5, lw(medthin) lc(gs14)) yla(2.1(.1)2.6) recast(scatter) ///
	ylabel(, nogrid) ///
	graphregion(color(white)) ///
	bgcolor(white) ///
	name(Fig2,replace)
graph export Fig2.eps, replace
	
// RQ2b: ingroup harmful. Table S5.
collect clear
collect create RQ2b_S5
collect: mixed fBelieve ///
	satire educ polint maled ///
	age demd proAtt ///
	1.conAtt 1.satire#1.conAtt ///
	feel evid TIP CMQ ///
	olnews offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ2b_S5)
collect export "fBelieveRQ2b_S5Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ2b_S5)
collect export "fBelieveRQ2b_S5Model.docx", replace

// RQ3: party ID. Table S6
collect clear
collect create RQ3_S6
collect: mixed fBelieve ///
	satire educ polint maled ///
	age ///
	1.demd 1.satire#1.demd ///
	proAtt conAtt ///
	feel evid TIP CMQ ///
	olnews offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ3_S6)
collect export "fBelieveRQ3_S6Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ3_S6)
collect export "fBelieveRQ3_S6Model.docx", replace

// Fig 3.
margins satire#demd, level(95) 
marginsplot, xdimension(satire) by(demd, ///
	elabels(1 "Republican" 2 "Democrat")) ///
	ciopts(lcolor(teal) lwidth(*2)) ///
	plotopts(msize(large) mcolor(teal)) ///
	xtitle("") ytitle("Pred. belief in falsehood") ///
	xlabel(-.5 " " 0 "Non-satiric origin" 1 "Satiric origin" 1.5 " ", tlength(0)) ///
	yli(2.5, lw(medthin) lc(gs14)) yla(2.0(.1)2.7) recast(scatter) ///
	ylabel(, nogrid) ///
	graphregion(color(white)) ///
	bgcolor(white) ///
	title(" ") ///
	name(Fig3,replace)	
graph export Fig3.eps, replace

// RQ4: faith in intuition. Table S7.
collect clear
collect create RQ4_S7
collect: mixed fBelieve ///
	1.satire educ polint maled ///
	age demd proAtt conAtt ///
	feel 1.satire#c.feel ///
	evid TIP CMQ ///
	olnews offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ4_S7)
collect export "fBelieveRQ4_S7Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ4_S7)
collect export "fBelieveRQ4_S7Model.docx", replace

// Fig S4.
margins satire, at(feel=(1(.5)5)) level(95)
marginsplot, ///
	title("") ///
	yti("Pred. belief in falsehood") ///
	xti("Faith in intuition") ///
	recastci(rarea) legend(on) ///
	plot1opts(mc(orange%30) lc(orange%30)) ///
	ci1opt(lc(orange%30) fc(orange%30)) ///
	plot2opts(mc(red%30) lc(red%30)) ///
	ci2opt(lc(red%30) fc(red%30)) ///
	ylabel(, nogrid) ///
	graphregion(color(white)) ///
	bgcolor(white) ///
	yli(2.5, lw(medthin) lc(gs14))

// RQ5: need for evidence. Table S8.
collect clear
collect create RQ5_S8
collect: mixed fBelieve ///
	1.satire educ polint maled ///
	age demd proAtt conAtt ///
	feel ///
	evid 1.satire#c.evid ///
	TIP CMQ ///
	olnews offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ5_S8)
collect export "fBelieveRQ5_S8Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ5_S8)
collect export "fBelieveRQ5_S8Model.docx", replace

// RQ6: truth is political. Table S9.
collect clear
collect create RQ6_S9
collect: mixed fBelieve ///
	1.satire educ polint maled ///
	age demd proAtt conAtt ///
	feel evid ///
	TIP 1.satire#c.TIP ///
	CMQ ///
	olnews offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ6_S9)
collect export "fBelieveRQ6_S9Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ6_S9)
collect export "fBelieveRQ6_S9Model.docx", replace

// Fig S5.
margins satire, at(TIP=(1(.5)5)) level(95)
marginsplot, ///
	title("") ///
	yti("Pred. belief in falsehood") ///
	xti("Truth is political") ///
	recastci(rarea) legend(on) ///
	plot1opts(mc(orange%30) lc(orange%30)) ///
	ci1opt(lc(orange%30) fc(orange%30)) ///
	plot2opts(mc(red%30) lc(red%30)) ///
	ci2opt(lc(red%30) fc(red%30)) ///
	ylabel(, nogrid) ///
	graphregion(color(white)) ///
	bgcolor(white) ///
	yli(2.5, lw(medthin) lc(gs14))

// RQ7: CMQ. Table S10.
collect clear
collect create RQ7_S10
collect: mixed fBelieve ///
	1.satire educ polint maled /// 
	age demd proAtt conAtt ///
	feel evid TIP ///
	CMQ 1.satire#c.CMQ ///
	olnews offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ7_S10)
collect export "fBelieveRQ7_S10Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ7_S10)
collect export "fBelieveRQ7_S10Model.docx", replace

// Fig S6.
margins satire, at(CMQ=(1(.5)5)) level(95)
marginsplot, ///
	title("") ///
	yti("Pred. belief in falsehood") ///
	xti("Conspiracy mentality") ///
	recastci(rarea) legend(on) ///
	plot1opts(mc(orange%30) lc(orange%30)) ///
	ci1opt(lc(orange%30) fc(orange%30)) ///
	plot2opts(mc(red%30) lc(red%30)) ///
	ci2opt(lc(red%30) fc(red%30)) ///
	ylabel(, nogrid) ///
	graphregion(color(white)) ///
	bgcolor(white) ///
	yli(2.5, lw(medthin) lc(gs14))

// RQ8a: online news use. Table S11
collect clear
collect create RQ8a_S11
collect: mixed fBelieve ///
	1.satire educ polint maled ///
	age demd proAtt conAtt ///
	feel evid TIP CMQ ///
	olnews 1.satire#c.olnews ///	
	offnews smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ8a_S11)
collect export "fBelieveRQ8a_S11Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ8a_S11)
collect export "fBelieveRQ8a_S11Model.docx", replace

// Fig S7.
margins satire, at(olnews=(1(.5)5)) level(95)
marginsplot, ///
	title("") ///
	yti("Pred. belief in falsehood") ///
	xti("Average online news use") ///
	recastci(rarea) legend(on) ///
	plot1opts(mc(orange%30) lc(orange%30)) ///
	ci1opt(lc(orange%30) fc(orange%30)) ///
	plot2opts(mc(red%30) lc(red%30)) ///
	ci2opt(lc(red%30) fc(red%30)) ///
	ylabel(, nogrid) ///
	graphregion(color(white)) ///
	bgcolor(white) ///
	yli(2.5, lw(medthin) lc(gs14))

// RQ8b: offline news use. Table S12.
collect clear
collect create RQ8b_S12
collect: mixed fBelieve ///
	1.satire educ polint maled ///
	age demd proAtt conAtt ///
	feel evid TIP CMQ ///
	olnews ///
	offnews 1.satire#c.offnews ///
	smuse logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ8b_S12)
collect export "fBelieveRQ8b_S12Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ8b_S12)
collect export "fBelieveRQ8b_S12Model.docx", replace

// RQ9: SM use. Table S13.
collect clear
collect create RQ9_S13
collect: mixed fBelieve ///
	1.satire educ polint maled ///
	age demd proAtt conAtt ///
	feel evid TIP CMQ ///
	olnews offnews ///
	smuse 1.satire#c.smuse ///
	logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ9_S13)
collect export "fBelieveRQ9_S13Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ9_S13)
collect export "fBelieveRQ9_S13Model.docx", replace

// RQ10: SM engagement. Table S14.
collect clear
collect create RQ10_S14
collect: mixed fBelieve ///
	1.satire educ polint maled ///
	age demd proAtt conAtt ///
	feel evid TIP CMQ ///
	olnews offnews ///
	smuse ///
	logFBeng 1.satire#c.logFBeng ///
	|| id: || wave: , vce(cluster id)
	estat ic
collect style cell, nformat(%9.3f)
collect layout (colname) (result[_r_b _r_se _r_p _r_ci]), name(RQ10_S14)
collect export "fBelieveRQ10_S14Coeff.docx", replace
collect layout (result[N N_clust N-g chi2 p]), name(RQ10_S14)
collect export "fBelieveRQ10_S14Model.docx", replace

// Fig 4.
margins satire, at(logFBeng=(9.5(.5)15)) level(95) 
marginsplot, ///
	title("") ///
	yti("Pred. belief in falsehood") ///
	xti("log of Facebook engagement") ///
	recastci(rarea) legend(on) ///
	plot1opts(mc(orange%30) lc(orange%30)) ///
	ci1opt(lc(orange%30) fc(orange%30)) ///
	plot2opts(mc(red%30) lc(red%30)) ///
	ci2opt(lc(red%30) fc(red%30)) ///
	ylabel(, nogrid) ///
	graphregion(color(white)) ///
	bgcolor(white) ///
	yli(2.5, lw(medthin) lc(gs14)) name(Fig4, replace)
graph export Fig4.eps, replace